#include<stdio.h>

int main()
{
    int n, i;
    long total = 1;
    
    scanf("%d", &n);

    for(i  =0; i < n - 1; i++)
    {
        total = (total + 1) * (total + 1);
    }

    printf("%ld", total);

    return 0;
}
